package com.longteng.lesson2.domain;

/**
 * Created by taki
 * DATE : 2018/11/4 0004
 * TIME : 22:58
 * PROJECT : java-lesson
 * PACKAGE : com.longteng.lesson
 *
 * @author <a href="mailto:165157905@qq.com">taki</a>
 */
public class Animal {

    public void eat(){
        System.out.println("吃饭");
    }
    //sleep通过入参的不同，体现了方法的重载
    public void sleep(int hour){
        System.out.println("睡了"+hour+"小时");
    }
    public void sleep(){
        System.out.println("睡了5小时");
    }
}
